package com.framework.movieManagement;

import com.framework.TestBase;
import com.framework.model.Movie;
import org.testng.annotations.Test;

import static org.testng.Assert.assertTrue;

public class RemoveMovie extends TestBase {

    @Test
    public void removeMovie() {
        app.getUserHelper().logout();
        app.getUserHelper().loginAs(ADMIN);
        String movieTitle = "movie" + System.currentTimeMillis();
        Movie movie = new Movie().setTitle(movieTitle).setYear("2012");
        app.getMovieHelper().create(movie).isCreated(movie);
        app.getMovieHelper().remove();
        assertTrue(app.getMovieHelper().checkMovieRemoved(movie.getTitle()));
    }
}
